import { mapMutations } from 'vuex';

export default {

    methods: {
        ...mapMutations({
            operatePageNavs: 'appendPageNav',
            deletePageNav: 'deleteNav'
        }),

        addCurrPage2Vuex() {
            let name = this.$options.name;
            let router = this.$route.path;
            this.operatePageNavs({
                name,
                router
            })
        },

        deleteCurrPage(nav) {
            this.deletePageNav(nav)
        }
    }
}